<template>
  <div>
    成绩
    <p> 语文：{{score1}}</p>
    <p> 数学：{{score2}}</p>
    <p> 总分：{{totalScore}}</p>
    <p> 总分：{{getTotal()}}</p>
   
  </div>
</template>

<script>
export default {
 

  data() {
    return {
     score1:90,
     score2:99 
    };
  },

  computed:{
  totalScore(){
    return this.score1+this.score2
  }
  },

  methods: {
    getTotal(){
       return this.score1+this.score2
    }
  },
};
</script>

<style  scoped>

</style>